module btoolkit {

	export class ScreenShotUtil {

		public static shotToBase64(): string {
			var htmlC = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0);
			var canvas = htmlC.getCanvas();
			var imgBase64 = canvas.toDataURL("image/jpeg", 0.8);//图片质量
			//imgBase64 = imgBase64.replace("image/png", "image/octet-stream");//用于本地存储
			return imgBase64;
		}

	}
}